lib/repo-pull: Improve error message when no summary is found
authorMatthew Leeds <matthew.leeds@endlessm.com>
Thu, 29 Mar 2018 07:03:43 +0000 (00:03 -0700)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 2 Apr 2018 22:40:37 +0000 (22:40 +0000)
commitb190982ee62fecc6095b5c48e99a615a27687665
treef7446b864da54d17f16fa0ea841a2b8f468cf678
parent5d84f5e102e4d9d0cd99425b194d005fa1c10710
lib/repo-pull: Improve error message when no summary is found

In ostree_repo_remote_fetch_summary_with_options(), if no summary is
found on the server and summary verification is enabled, the error
message implies that it's the summary signature that's missing, which is
misleading. This commit adds a more specific error message for the case
of a missing summary, which has the side effect of explicitly checking
for the case that signatures != NULL && summary == NULL after
repo_remote_fetch_summary(), even though that should never happen.

One effect of this is that if you run "flatpak remote-add" with an
incorrect URL you get a more helpful error message, and similarly for
other flatpak operations and other users of ostree.

Closes: #1522
Approved by: cgwalters
src/libostree/ostree-repo-pull.c